import { defineClientAppEnhance } from '@vuepress/client'
import '../../lib/index.less'
import ZUI from '../../lib/index.js'
import 'dayjs/locale/zh-cn'
import locale from '../../es/locale-provider/zh_CN.js'
import * as Icons from '@ant-design/icons-vue'
import dayjs from 'dayjs'

export default defineClientAppEnhance(({ app, router, siteData }) => {
  app.use(ZUI)
  const icons = Icons
  for (const i in icons) {
    app.component(i, icons[i])
  }
  app.config.globalProperties.locale = locale
  app.config.globalProperties.dayjs = dayjs
})